import { lazy } from "react";
import { Navigate } from 'react-router-dom'

const Home = lazy(() => import('../page/Home/Index'));
const Login = lazy(() => import('../page/Login/Index'));
const Dateil = lazy(() => import('../page/Dateil/Index'));
const City = lazy(() => import('../page/City/Index'));
const Search = lazy(() => import('../page/Search/Index'))
const Pw = lazy(() => import('../page/Pw/Index'));
const List = lazy(() => import('../page/List/Index'))
const Gp = lazy(() => import('../page/Gp/Index'));
const Zc = lazy(() => import('../page/Zc/Index'));

const router = [
    {
        path: '/',
        element: <Navigate to={'/home'} />,
    }, {
        path: "/home",
        element: <Home />,
    }, {
        path: "/login",
        element: <Login />,
    }, {
        path: "/dateil",
        element: <Dateil />,
    }, {
        path: '/city',
        element: <City />,
    }, {
        path: '/search',
        element: <Search />,
    }, {
        path: "/pw",
        element: <Pw />,
    }, {
        path: "/list",
        element: <List />,
    }, {
        path: "/gp",
        element: <Gp />,
    }, {
        path: '/zc',
        element: <Zc />,
    }
]


export default router;
